package lab1;

public class MealBuilderFactory {

    public static MealBuilder getBuilder(String s){
        try{
            Class clz = Class.forName("lab1."+s);
            return (MealBuilder) clz.newInstance();
        }catch ( ClassNotFoundException| InstantiationException|IllegalAccessException e){
            MealBuilder mealBuilder = new ChickenEggBuilder();
            return mealBuilder;
        }
    }
}
